<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10">
<form name="myform" id="myform" action="?m=speciallist&c=speciallist&a=newslistUpdata" method="post" >
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th width="50%" align="center">首页新闻列表显示栏目</th>
			<th width="50%" align="center">栏目ID:栏目名</th>
		</tr>
	</thead>
<tbody>
<?php
if(is_array($infos)){
	foreach($infos as $k => $info){
		?>
	<tr>
		<td align="center"><?php echo '第'.(intval($k)+1).'个列表';?></td>
		<td align="center">
			<select name="<?php echo 's'.(intval($k)+1);?>">
				<?php
					if(is_array($lists)){
						foreach($lists as $option){
								if($info['catId'] == $option['catid']){
							?>
								<option selected>
							<?php }else{?>
								<option>
							<?php }echo $option['catid'].':'.$option['catname'];?></option>
							<?php
						}
					}
					if($info['catId'] == '0'){
						?>
						<option selected>0:隐藏栏目</option>
						<?php
					}else{
						?>	
						<option>0:隐藏栏目</option>
						<?php
					}
				?>
			</select>
		</td>
	</tr>
	<?php
	}
}
?>
</tbody>
</table>
</div>
<div class="btn"> 
<input name="dosubmit" type="submit" class="button" value="提交"></div>
</form>
</div>
<script type="text/javascript">

function edit(id) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'修改栏目',id:'edit',iframe:'?m=speciallist&c=speciallist&a=edit&id='+id+'&type=<?php echo $type;?>&catName=<?php echo $info["catName"];?>',width:'700',height:'250'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function checkuid() {
	var ids='';
	$("input[name='linkid[]']:checked").each(function(i, n){
		ids += $(n).val() + ',';
	});
	if(ids=='') {
		window.top.art.dialog({content:"<?php echo L('before_select_operations')?>",lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	} else {
		myform.submit();
	}
}
</script>
</body>
</html>
